<?php
/*  
  Copyright (c) 2010-02 SongCMS 
  SongCMS All Rights Reserved. 
  Support:www.SongCMS.com
  QQ:544255858   19951025
  Author:Song  Version:3.17
  Date:2010-08-12 09:28:32
*/
$product = new product();
$product -> Lang = $Lang;
$product -> Ltext = $Html['page'];
$SC -> register -> templateObject("product",$product);
$news = new news();
$news -> Lang = $Lang;
$news -> Ltext = $Html['page'];
$SC -> register -> templateObject("news",$news);
$article = new article();
$article -> Lang = $Lang;
$article -> Ltext = $Html['page'];
$SC -> register -> templateObject("article",$article);
$SC -> register -> templateObject("sdb",$sdb);
switch ($p = $product -> ProductDetail($sGET['i'])){
	case 0: die($Warning[10]); break;
	case 1: die($Warning[11]); break;
	case 2: die($Warning[12]); break;
}
$cv['ID'] = $p['ID']; 
$cv['type'] = 1;  
$cv['xtype'] = 'product'; 
$cv['Agree'] = $p['ProductAgree']; 
$cv['Disagree'] = $p['ProductDisagree']; 
$cv['AgreeTotal'] = $p['ProductAgree'] + $p['ProductDisagree']; 
$cv['AgreePercent'] = @round($p['ProductAgree']/$cv['AgreeTotal']*100,1); 
$cv['DisagreePercent'] = @round($p['ProductDisagree']/$cv['AgreeTotal']*100,1); 
$cv['AgreeWidth'] = @round($cv['AgreePercent'] * 142/100); 
$cv['DisagreeWidth'] = @round($cv['DisagreePercent'] * 142/100); 
$cv['CommentURL'] = $Lang == 1 ? "./?fcomment/t1/i{$p['ID']}" : "./?fcomment/l{$Lang}/t1/i{$p['ID']}"; 
$cv['CURL'] = $Lang == 1 ? "./?fcomment/t1/i{$p['ID']}" : "./?fcomment/l{$Lang}/t1/i{$p['ID']}"; 
$cv['CommentTotal'] = $sdb -> CommentTotal(1,$p['ID']); 
$SC -> assign('cv',$cv);
if(!empty($p['ProductKeyWord'])) $WebConfig['Webkeyword'] = $p['ProductKeyWord'];
$aparr['word'] = empty($p['ProductSummary']) ? $p['ProductContent'] : $p['ProductSummary'];
$aparr['length'] = 200;
$aparr['illegal'] = 1;
$aparr['suffix'] = "";
$WebConfig['WebDescription'] = $sdb -> html2txt($aparr);
$SC -> assign('Web',$WebConfig);
$db = new db();
$p['Sort'] = ArticleName($p['ProductRela'],' >> ',1);
$SC->assign("p",$p);
unset($db,$p);
include_once('top.php');
include_once('bottom.php');
$SC -> display($TemFile,$GetUrlPar);
?>